const express = require('express')
const cors = require('cors')
const app = express()
app.use(cors())
app.get('/api', (req, res,err) => {
    if (err) return err
    res.send({
        state: 200,
        msg: '成功',
        data: {
            name: '陈嘉兴',
            age: 23,
            sex: '男'
        }
    })
})
app.listen(5000, () => {
    console.log('serve runing at http://127.0.0.1:5000');
})